
#ifdef SUPPORT_MS_EXTENSIONS
#pragma bss_seg(".rt_anc.data.bss")
#pragma data_seg(".rt_anc.data")
#pragma const_seg(".rt_anc.text.const")
#pragma code_seg(".rt_anc.text")
#endif

#include "app_config.h"
#include "audio_config_def.h"

#if TCFG_AUDIO_ANC_ENABLE && TCFG_AUDIO_ANC_REAL_TIME_ADAPTIVE_ENABLE

#define LEFT 0 //gali test

static const u8  mem_curves = 18;
static const u8  tg_cmp_en = 0;
static const int target_cmp_num = 0;
static const float GAIN_LIMIT_ALL = 20;
static const int ICSD_IIR_NUM_FLEX = 6;
static const int ICSD_IIR_NUM_FIX = 4;
static const int ICSD_IIR_COEF = ICSD_IIR_NUM_FLEX * 3 + 1;

static const float _degree_set0[] = {7,  -2, 50, 2200, 50, 2700, 11};
static const float _degree_set1[] = {11,  0, 50, 2200, 50, 2700, 11};
static const float _degree_set2[] = {11,  0, 50, 2200, 50, 2700, 11};

static const float biquad_left_h[] = { // 217
    -25, 14674, 1.0,
    -8.2, 8780, 3.0,
    4.941, 4635, 1,
    -25.4, 2773, 1,
    14.1,  1533, 0.6,
    2.79, 45, 1,
    -1.125, 92, 1,
    -0.147, 236, 1,
    0.352, 387, 1,
    -0.342, 673, 1,
    -1,
};

static const float biquad_left_m[] = { // 217
    -4.476,  1801, 1,
    -26.954, 7006, 1,
    -0.309,  1056, 3,
    -24.801, 3934, 1,
    -7.425,  1216, 1,
    -7.634,   656, 1.5,
    7.743,   498, 1.0,
    -4.454,   197, 0.6,
    -3.139,    88, 1,
    2.123,    21, 0.8,
    -1,
};

static const float biquad_left_l[] = { // 217
    -4.476,  1801, 1,
    -26.954, 7006, 1,
    -0.309,  1056, 3,
    -24.801, 3934, 1,
    -7.425,  1216, 1,
    -7.634,   656, 1.5,
    7.743,   498, 1.0,
    -4.454,   197, 0.6,
    -3.139,    88, 1,
    2.123,    21, 0.8,
    -1,
};

static const float biquad_right_h[] = { // 217
    // -6.816,  2775, 1,
    // -17.937, 6913, 1,
    // 3.408,   3533, 2,
    // -20.267, 3960, 1,
    // -12.197, 1362, 1,
    // -8.251,   692, 1,
    // 7.354,    485, 0.65,
    // -5.202,   193, 0.6,
    // -1.794,    91, 0.8,
    // -2.87,     44, 0.8,
    // -1,
    -6.816,  2775, 1.01,
    -10.937, 6913, 1,
    3.408,   3533, 2,
    -12.267, 3960, 1,
    -12.197, 1362, 1,
    -8.251,   692, 1,
    7.354,    485, 0.65,
    -5.202,   193, 0.6,
    -1.794,    91, 0.8,
    -2.87,     44, 0.8,
    -1,
};

static const float biquad_right_m[] = { // 217
    -6.816,  2775, 1,
    -17.937, 6913, 1,
    3.408,   3533, 2,
    -20.267, 3960, 1,
    -12.197, 1362, 1,
    -8.251,   692, 1,
    7.354,    485, 0.65,
    -5.202,   193, 0.6,
    -1.794,    91, 0.8,
    -2.87,     44, 0.8,
    -1,
};

static const float biquad_right_l[] = { // 217
    -6.816,  2775, 1,
    -17.937, 6913, 1,
    3.408,   3533, 2,
    -20.267, 3960, 1,
    -12.197, 1362, 1,
    -8.251,   692, 1,
    7.354,    485, 0.65,
    -5.202,   193, 0.6,
    -1.794,    91, 0.8,
    -2.87,     44, 0.8,
    -1,
};

u8 biquad_type[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };

static const float total_gain_adj_begin = 200;
static const float total_gain_adj_end = 400;

#if 0
static const float mse_tar_h[] = {
    -1.6500, -2.0738, -2.8277, -4.7291, -6.8562, -8.4567, -9.4354, -10.0922, -10.5726, -10.9212, -11.1700, -11.3449, -11.4491, -11.4623, -11.3582,
    -11.1208, -10.7508, -10.2628, -9.6799, -9.0303, -8.3442, -7.6523, -6.9840, -6.3662, -5.8201, -5.3598, -4.9908, -4.7098, -4.5073, -4.3698,
    -4.2830, -4.2329, -4.2081, -4.1990, -4.1987, -4.2022, -4.2058, -4.2073, -4.2053, -4.1990, -4.1881, -4.1725, -4.1523, -4.1278, -4.0994,
    -4.0675, -4.0323, -3.9943, -3.9539, -3.9114, -3.8670, -3.8212, -3.7741, -3.7260, -3.6771, -3.6276, -3.5777, -3.5275, -3.4771, -3.4268,
};

static const float mse_tar_m[] = {
    -3.5180, -5.7700, -8.9507, -13.3933, -17.6281, -21.2654, -24.1849, -26.2871, -27.5816, -28.2322, -28.4510, -28.3906, -28.1234, -27.6668, -27.0155,
    -26.1651, -25.1261, -23.9260, -22.6027, -21.1960, -19.7423, -18.2723, -16.8126, -15.3874, -14.0207, -12.7379, -11.5646, -10.5250, -9.6372, -8.9097,
    -8.3383, -7.9079, -7.5959, -7.3770, -7.2271, -7.1258, -7.0569, -7.0084, -6.9717, -6.9407, -6.9115, -6.8815, -6.8492, -6.8135, -6.7742,
    -6.7310, -6.6841, -6.6336, -6.5797, -6.5229, -6.4634, -6.4015, -6.3376, -6.2719, -6.2047, -6.1363, -6.0669, -5.9967, -5.9259, -5.8548,
};
#else
static const float mse_tar_h[] = {
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
};

static const float mse_tar_m[] = {
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
    -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
};
#endif

static const float mse_tar_l[] = {
    0.0000, -7.9894, -16.1966, -18.7870, -19.8165, -20.2239, -20.4848, -20.6658, -20.7279, -20.6792, -20.5788, -20.4855, -20.4146, -20.3278, -20.1491,
    -19.8046, -19.2655, -18.5615, -17.7553, -16.9078, -16.0600, -15.2327, -14.4335, -13.6639, -12.9238, -12.2137, -11.5348, -10.8891, -10.2783, -9.7035,
    -9.1651, -8.6626, -8.1951, -7.7611, -7.3587, -6.9858, -6.6403, -6.3201, -6.0231, -5.7474, -5.4910, -5.2523, -5.0296, -4.8215, -4.6266,
    -4.4438, -4.2719, -4.1099, -3.9570, -3.8124, -3.6754, -3.5453, -3.4218, -3.3042, -3.1922, -3.0853, -2.9833, -2.8859, -2.7928, -2.7037
};

static const float weight_h[] = { //354
    0.00, 0.00, 10.00, 10.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 40.00, 40.00, 40.00, 40.00,
    40.00, 40.00, 40.00, 40.00, 40.00, 40.00, 40.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00,
    20.00, 20.00, 20.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 0.00,
    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
};

static const float weight_m[] = { //279
    0.00, 0.00, 10.00, 10.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 40.00, 40.00, 40.00, 40.00,
    40.00, 40.00, 40.00, 40.00, 40.00, 40.00, 40.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00,
    20.00, 20.00, 20.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00, 0.00,
    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
};

static const float weight_l[] = { //429
    0.00, 0.00, 20.00, 40.00, 40.00, 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, 5.00,
    5.00, 5.00, 5.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
};

static const float Vrange_left_h[] = {   // 62
    -20, 20, 1000, 1500, 0.5, 1.0,
    -20,  5,   20,   50, 0.5, 1.0, //50,
    -20, 10,   50,  100, 0.5, 1.0, //100
    -20, 20,  100,  200, 0.7, 1.3, //300
    -20, 20,  200,  500, 0.7, 1.3, //600
    -20, 20,  500,  900, 0.7, 1.3, //800
    -0.50, -2.00,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};
static const float Vrange_left_m[] = {   // 62
    -10, -4, 600, 1000, 1.2, 1.8,
    4,  10, 350,  550, 0.5, 1.5,
    -8,  -1, 150,  300, 0.5, 1.0,
    -8,   0,  50,  120, 0.6, 1.2,
    -1,   5,  20,   50, 0.6, 1.0,
    -0.5623, -1.7783,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};
static const float Vrange_left_l[] = {   // 62
    -10, -4, 600, 1000, 1.2, 1.8,
    4,  10, 350,  550, 0.5, 1.5,
    -8,  -1, 150,  300, 0.5, 1.0,
    -8,   0,  50,  120, 0.6, 1.2,
    -1,   5,  20,   50, 0.6, 1.0,
    -0.5623, -1.7783,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};
static const float Vrange_right_h[] = {   // 62
    -10, 15, 600, 1000, 0.8, 1.5,
    4,  20, 350, 550, 0.4, 1.0,
    -8,  11, 150, 300, 0.5, 1.0,
    -3.5, 12, 50, 120, 0.6, 1.0,
    -5,  11, 20, 50, 0.6, 1.0,
    -0.5623, -1.7783,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};
static const float Vrange_right_m[] = {   // 62
    -10, -5, 600, 1000, 0.8, 1.5,
    4,  10, 350, 550, 0.4, 1.0,
    -8,  -1, 150, 300, 0.5, 1.0,
    -3.5, 2, 50, 120, 0.6, 1.0,
    -5,   1, 20, 50, 0.6, 1.0,
    -0.5623, -1.7783,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};
static const float Vrange_right_l[] = {   // 62
    -10, -5, 600, 1000, 0.8, 1.5,
    4,  10, 350, 550, 0.4, 1.0,
    -8,  -1, 150, 300, 0.5, 1.0,
    -3.5, 2, 50, 120, 0.6, 1.0,
    -5,   1, 20, 50, 0.6, 1.0,
    -0.5623, -1.7783,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};

static const float target_sv[] = {
    //target_sv 7*11
    15.436974, 15.436974, 11.983847, 11.983847, 10.708618, 8.375820, 8.489555,
    10.925051, 10.925051, 7.696263, 7.696263, 6.730499, 5.204338, 5.633255,
    7.762661, 7.762661, 5.498096, 5.498096, 4.571212, 3.865085, 4.176605,
    4.003726, 4.003726, 2.579337, 2.579337, 2.147882, 2.196041, 2.871806,
    1.125450, 1.125450, 0.729958, 0.729958, 0.375797, 0.762437, 1.831914,
    -1.533136, -1.533136, -1.898488, -1.898488, -2.086011, -1.611104, -0.310649,
    -3.883836, -3.883836, -4.030689, -4.030689, -4.191140, -2.056570, -0.994565,
    6, 5, 5, 3, 3, 1, 1,
    4, 3, 3, 1, 1, 1, 1,
    1, 0, 0, -1, -1, -1, -1,
    -2, -2, -2, -2, -3, -3, -3,
};
static const float tg_cmp[] = {
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
    1.02201, 0.0322433, 1.02201, 0.0322433, 1.02201, 0.0322433, 0.963349, -0.000968005, 0.967021, 0.0178265, 0.978098, 0.0238376, 0.990542, 0.0403655, 0.995813, -0.00421798, 0.957552, 0.0645147, 1.00922, 0.097302, 0.960857, 0.0318004, 0.968784, 0.0531604, 0.985264, 0.0884734, 0.987565, 0.0857616, 0.994512, 0.08542, 0.975614, 0.0581078, 0.96272, 0.0660321, 0.979078, 0.0622491, 0.974254, 0.0742299, 0.956256, 0.0732022, 0.942954, 0.0814068, 0.919296, 0.089465, 0.9153, 0.0998335, 0.906497, 0.106432, 0.885251, 0.118955, 0.892155, 0.126928, 0.889859, 0.12902, 0.880264, 0.152598, 0.897881, 0.140147, 0.872807, 0.134296, 0.862713, 0.133326, 0.840126, 0.127068, 0.824774, 0.117821, 0.804555, 0.124305, 0.792562, 0.124639, 0.769757, 0.135443, 0.769441, 0.142001, 0.754743, 0.145792, 0.757611, 0.145831, 0.740684, 0.142915, 0.724596, 0.12841, 0.710874, 0.120853, 0.683119, 0.0953128, 0.642901, 0.0924606, 0.585553, 0.0874913, 0.547245, 0.105982, 0.513224, 0.125594, 0.469322, 0.104028, 0.398365, 0.132748, 0.425682, 0.186821, 0.383916, 0.128197, 0.350492, 0.116331, 0.269779, 0.107604, 0.194372, 0.09721, 0.131983, 0.132588, 0.0643436, 0.0931232, -0.106231, 0.0787841, -0.296595, 0.179639, -0.34968, 0.259541, -0.618408, 0.265743,
};

#if LEFT
static const float pz_table[] = {
    0.782983, -0.364186, 0.782983, -0.364186, 0.782983, -0.364186, 0.708490, -0.412892, 0.617468, -0.441820, 0.534072, -0.465807, 0.455490, -0.465077, 0.399808, -0.457325, 0.351314, -0.446232, 0.304510, -0.424624, 0.261735, -0.404434, 0.221859, -0.364490, 0.186485, -0.351892, 0.152099, -0.331340, 0.093257, -0.317571, 0.076813, -0.291764, 0.065053, -0.263535, 0.043433, -0.234296, 0.054085, -0.202804, 0.064324, -0.166570, 0.068540, -0.165407, 0.066478, -0.165979, 0.055745, -0.150379, 0.111933, -0.128566, 0.144670, -0.171883,
    0.793633, -0.358360, 0.793633, -0.358360, 0.793633, -0.358360, 0.720625, -0.422841, 0.621467, -0.452498, 0.546869, -0.454585, 0.489549, -0.471607, 0.416421, -0.448292, 0.361603, -0.428325, 0.316714, -0.436575, 0.276198, -0.397389, 0.242560, -0.372960, 0.208816, -0.365069, 0.177805, -0.350238, 0.103639, -0.347843, 0.070716, -0.323150, 0.047592, -0.289066, 0.063466, -0.244472, 0.044829, -0.214094, 0.054034, -0.170943, 0.077603, -0.145860, 0.084674, -0.144972, 0.087507, -0.150753, 0.114162, -0.149918, 0.140616, -0.177429,
    0.818494, -0.352921, 0.818494, -0.352921, 0.818494, -0.352921, 0.745304, -0.397015, 0.657655, -0.444886, 0.578958, -0.464827, 0.506110, -0.456395, 0.440009, -0.470986, 0.393326, -0.459938, 0.348272, -0.440944, 0.306586, -0.419570, 0.264036, -0.395237, 0.228096, -0.389765, 0.169939, -0.383226, 0.125999, -0.359862, 0.080037, -0.333099, 0.055679, -0.299234, 0.037908, -0.266677, 0.054902, -0.232506, 0.040115, -0.188195, 0.066041, -0.166260, 0.089149, -0.157985, 0.087563, -0.167217, 0.125395, -0.154523, 0.115983, -0.204013,
    0.882388, -0.325463, 0.882388, -0.325463, 0.882388, -0.325463, 0.820311, -0.374015, 0.732239, -0.436543, 0.650859, -0.469809, 0.593210, -0.484792, 0.521021, -0.512926, 0.479649, -0.510995, 0.417696, -0.487284, 0.378881, -0.467922, 0.314008, -0.462947, 0.249334, -0.463817, 0.181619, -0.451329, 0.116531, -0.426742, 0.068755, -0.392384, 0.071457, -0.345002, 0.019976, -0.306895, 0.011944, -0.270446, 0.016469, -0.219567, 0.025801, -0.190744, 0.064088, -0.168522, 0.070610, -0.162567, 0.109866, -0.160281, 0.100947, -0.202430,
    0.928064, -0.301352, 0.928064, -0.301352, 0.928064, -0.301352, 0.867971, -0.369412, 0.800301, -0.429482, 0.723740, -0.476584, 0.658210, -0.491502, 0.590767, -0.517405, 0.535450, -0.517450, 0.476044, -0.506738, 0.430554, -0.495013, 0.357160, -0.503107, 0.292132, -0.503624, 0.197441, -0.501185, 0.117057, -0.470891, 0.061879, -0.425971, 0.062124, -0.373694, 0.015716, -0.335388, 0.020941, -0.299810, 0.019124, -0.244218, 0.036922, -0.203948, 0.058628, -0.182212, 0.079274, -0.172342, 0.110780, -0.175399, 0.098774, -0.208664,
    0.955566, -0.287711, 0.955566, -0.287711, 0.955566, -0.287711, 0.906606, -0.332674, 0.844028, -0.421588, 0.760460, -0.466087, 0.686173, -0.485757, 0.629849, -0.537933, 0.571375, -0.537838, 0.513264, -0.534387, 0.458361, -0.539755, 0.380258, -0.530233, 0.303922, -0.522992, 0.212592, -0.518131, 0.169010, -0.484512, 0.063491, -0.459872, 0.053112, -0.408812, 0.014128, -0.368032, 0.019116, -0.329701, 0.004261, -0.259584, 0.025076, -0.214077, 0.057976, -0.191811, 0.055725, -0.190482, 0.099002, -0.186857, 0.086057, -0.212147,
    0.974611, -0.258214, 0.974611, -0.258214, 0.974611, -0.258214, 0.928418, -0.298192, 0.893010, -0.387862, 0.821931, -0.454807, 0.772663, -0.479178, 0.718835, -0.531029, 0.648654, -0.543268, 0.575734, -0.558499, 0.539819, -0.575660, 0.435731, -0.592043, 0.341685, -0.602566, 0.238137, -0.591714, 0.134639, -0.562296, 0.074584, -0.514562, 0.041129, -0.459316, -0.010357, -0.404894, -0.015421, -0.357366, -0.017892, -0.274405, 0.003211, -0.219562, 0.037387, -0.190891, 0.045639, -0.186967, 0.093209, -0.182374, 0.069618, -0.203487,
    0.970427, -0.257368, 0.970427, -0.257368, 0.970427, -0.257368, 0.966700, -0.315843, 0.918499, -0.429921, 0.847518, -0.484455, 0.772793, -0.499286, 0.716097, -0.562061, 0.670197, -0.577813, 0.584145, -0.560297, 0.526868, -0.573850, 0.436684, -0.563401, 0.361582, -0.579760, 0.234991, -0.587074, 0.140835, -0.556982, 0.093657, -0.511308, 0.057743, -0.458986, 0.002380, -0.406570, -0.000075, -0.357605, -0.008943, -0.277991, 0.000971, -0.235716, 0.047857, -0.219680, 0.031779, -0.212067, 0.075955, -0.195350, 0.057787, -0.202828,
    1.015850, -0.210183, 1.015850, -0.210183, 1.015850, -0.210183, 0.986194, -0.275639, 0.977973, -0.335432, 0.906659, -0.418490, 0.852062, -0.481349, 0.807338, -0.534332, 0.740490, -0.578405, 0.680964, -0.594727, 0.628607, -0.604762, 0.520128, -0.641758, 0.400081, -0.673972, 0.282570, -0.665539, 0.170735, -0.634578, 0.067548, -0.587739, 0.010751, -0.523248, -0.020985, -0.459591, -0.008322, -0.405644, -0.037798, -0.313276, -0.021844, -0.248639, 0.028658, -0.219317, 0.039200, -0.207326, 0.071044, -0.204908, 0.054518, -0.201356,
    1.042140, -0.188782, 1.042140, -0.188782, 1.042140, -0.188782, 0.987302, -0.246833, 0.977655, -0.333984, 0.916754, -0.393047, 0.894452, -0.459227, 0.821439, -0.538015, 0.782311, -0.583169, 0.712258, -0.598057, 0.642407, -0.623208, 0.534442, -0.646249, 0.415813, -0.682394, 0.280201, -0.674492, 0.154082, -0.638821, 0.068680, -0.590046, 0.044025, -0.531108, -0.033996, -0.470371, -0.036886, -0.416767, -0.038984, -0.329518, -0.046024, -0.256746, 0.016244, -0.231583, 0.032011, -0.213897, 0.054957, -0.204862, 0.062049, -0.190558,
    1.035750, -0.175155, 1.035750, -0.175155, 1.035750, -0.175155, 1.030340, -0.220395, 1.027540, -0.289148, 0.995082, -0.376384, 0.967884, -0.449214, 0.941454, -0.529004, 0.893436, -0.565585, 0.815309, -0.608214, 0.750770, -0.646967, 0.620579, -0.723585, 0.488575, -0.757676, 0.332323, -0.767293, 0.193065, -0.740206, 0.072482, -0.693696, 0.023638, -0.623765, -0.046589, -0.549442, -0.062798, -0.486464, -0.078362, -0.376183, -0.048225, -0.293740, -0.008753, -0.251678, 0.015666, -0.226154, 0.035055, -0.236916, 0.020934, -0.193238,
    1.075900, -0.134771, 1.075900, -0.134771, 1.075900, -0.134771, 1.071370, -0.177959, 1.067880, -0.266451, 1.052280, -0.332283, 1.029010, -0.392578, 1.014830, -0.489451, 0.983498, -0.536403, 0.909663, -0.592909, 0.855296, -0.651695, 0.743957, -0.755527, 0.563306, -0.824254, 0.375342, -0.845578, 0.230757, -0.818703, 0.102263, -0.772585, 0.052868, -0.689995, -0.046428, -0.601884, -0.043675, -0.532860, -0.052001, -0.430151, -0.054570, -0.365100, -0.065097, -0.330293, -0.086305, -0.281885, -0.018128, -0.197678, 0.058938, -0.194993,
    1.056150, -0.123820, 1.056150, -0.123820, 1.056150, -0.123820, 1.049000, -0.173224, 1.070800, -0.243596, 1.058290, -0.323089, 1.043720, -0.393275, 1.037680, -0.483687, 0.993940, -0.548901, 0.921508, -0.605647, 0.857983, -0.689506, 0.725436, -0.758853, 0.568444, -0.829717, 0.423345, -0.844711, 0.233631, -0.853672, 0.135485, -0.813424, 0.005757, -0.744850, -0.053896, -0.651723, -0.094780, -0.565499, -0.125904, -0.418681, -0.097568, -0.308129, -0.050746, -0.258396, -0.028757, -0.246555, 0.014539, -0.212660, 0.035191, -0.199279,
    1.077520, -0.107180, 1.077520, -0.107180, 1.077520, -0.107180, 1.088430, -0.139438, 1.113650, -0.202239, 1.108750, -0.267181, 1.094690, -0.333076, 1.119280, -0.432222, 1.097340, -0.493756, 1.040490, -0.576299, 1.004050, -0.652673, 0.879930, -0.791301, 0.703044, -0.895829, 0.502012, -0.940130, 0.303153, -0.939461, 0.128882, -0.906195, 0.043090, -0.829316, -0.054361, -0.731753, -0.069068, -0.642325, -0.092240, -0.482796, -0.072927, -0.400903, -0.080474, -0.368581, -0.114052, -0.318104, -0.046882, -0.225784, 0.001140, -0.182993,
    1.093960, -0.070906, 1.093960, -0.070906, 1.093960, -0.070906, 1.101740, -0.098415, 1.125190, -0.143699, 1.139760, -0.192865, 1.151680, -0.264745, 1.185310, -0.333220, 1.187710, -0.397080, 1.149650, -0.479814, 1.141830, -0.554906, 1.072760, -0.751516, 0.937952, -0.919215, 0.741909, -1.034970, 0.490091, -1.105820, 0.238758, -1.104240, 0.074014, -1.012210, -0.070089, -0.891579, -0.128045, -0.785018, -0.172534, -0.584929, -0.139825, -0.465031, -0.135748, -0.418052, -0.167272, -0.365735, -0.108672, -0.220552, -0.033089, -0.200300,
    1.088910, -0.063446, 1.088910, -0.063446, 1.088910, -0.063446, 1.090750, -0.092172, 1.133880, -0.131617, 1.148100, -0.176885, 1.150230, -0.252679, 1.197250, -0.321458, 1.196930, -0.369236, 1.167890, -0.449560, 1.163380, -0.535526, 1.093820, -0.722313, 0.958148, -0.901378, 0.735885, -1.063690, 0.565023, -1.114750, 0.268492, -1.152460, 0.092072, -1.074360, -0.042249, -0.953929, -0.118641, -0.834204, -0.145331, -0.641100, -0.127174, -0.500267, -0.135499, -0.446373, -0.154750, -0.394256, -0.116323, -0.252706, -0.016441, -0.211359,
    1.093550, -0.042590, 1.093550, -0.042590, 1.093550, -0.042590, 1.093970, -0.061900, 1.127380, -0.100018, 1.159260, -0.131881, 1.182090, -0.180528, 1.240880, -0.254675, 1.242330, -0.291261, 1.232790, -0.347960, 1.245000, -0.426205, 1.241400, -0.608236, 1.155790, -0.823554, 0.987995, -1.046110, 0.832893, -1.170470, 0.500235, -1.310160, 0.237084, -1.289410, 0.017352, -1.171510, -0.090815, -1.038330, -0.208824, -0.786798, -0.192821, -0.577962, -0.170767, -0.516262, -0.208991, -0.468514, -0.182684, -0.278161, -0.077223, -0.221946,
    1.086400, -0.013000, 1.086400, -0.013000, 1.086400, -0.013000, 1.083260, -0.017048, 1.111580, -0.037172, 1.135130, -0.049277, 1.154780, -0.075445, 1.205410, -0.093179, 1.217800, -0.111985, 1.236040, -0.151043, 1.269940, -0.176081, 1.323030, -0.306593, 1.380810, -0.446408, 1.403610, -0.647472, 1.435170, -0.869820, 1.354670, -1.232130, 1.175820, -1.498270, 0.779611, -1.720680, 0.557527, -1.741290, -0.045033, -1.591080, -0.290029, -1.172860, -0.318001, -0.992814, -0.403016, -0.914535, -0.540627, -0.481117, -0.384650, -0.292763,
};
static const float sz_table[] = {
    0.644680, -0.089165, 0.644680, -0.089165, 0.644680, -0.089165, 0.628708, -0.154484, 0.522668, -0.242648, 0.467249, -0.238948, 0.418490, -0.236128, 0.353800, -0.253730, 0.323044, -0.236990, 0.306131, -0.229761, 0.278991, -0.216278, 0.245267, -0.189269, 0.229031, -0.161285, 0.216018, -0.139051, 0.208080, -0.124070, 0.202119, -0.110638, 0.194916, -0.098327, 0.183537, -0.092751, 0.177719, -0.077490, 0.186572, -0.028676, 0.227037, 0.012072, 0.266701, -0.008092, 0.261493, -0.030297, 0.298796, 0.045942, 0.464085, 0.035669,
    0.587072, -0.148169, 0.587072, -0.148169, 0.587072, -0.148169, 0.541304, -0.197571, 0.510121, -0.221441, 0.474077, -0.236629, 0.450568, -0.243256, 0.367264, -0.248109, 0.324015, -0.246024, 0.295140, -0.237516, 0.262828, -0.217200, 0.233415, -0.197097, 0.215957, -0.164519, 0.206232, -0.142546, 0.202025, -0.123406, 0.191528, -0.114832, 0.183973, -0.101051, 0.178128, -0.087376, 0.172099, -0.076017, 0.169764, -0.047452, 0.201719, 0.017574, 0.270804, 0.041915, 0.342425, -0.027088, 0.363094, -0.047651, 0.453441, -0.003118,
    0.559669, -0.126985, 0.559669, -0.126985, 0.559669, -0.126985, 0.528875, -0.176730, 0.498674, -0.199354, 0.464328, -0.214991, 0.441337, -0.221547, 0.366540, -0.233149, 0.327962, -0.228681, 0.301743, -0.222543, 0.271762, -0.210445, 0.239020, -0.188997, 0.222579, -0.161673, 0.208155, -0.146756, 0.200916, -0.129029, 0.189984, -0.115575, 0.179239, -0.102550, 0.174637, -0.084842, 0.171575, -0.070415, 0.170357, -0.048369, 0.202273, 0.018881, 0.269142, 0.033417, 0.337385, -0.003725, 0.367204, -0.002623, 0.459249, -0.027481,
    0.508842, -0.065814, 0.508842, -0.065814, 0.508842, -0.065814, 0.488415, -0.108778, 0.468132, -0.131163, 0.443198, -0.148207, 0.428308, -0.157349, 0.369989, -0.177265, 0.335681, -0.185211, 0.312906, -0.183540, 0.284306, -0.177363, 0.256892, -0.162206, 0.241041, -0.142715, 0.227732, -0.131256, 0.216878, -0.121603, 0.204654, -0.112001, 0.191731, -0.102056, 0.185499, -0.083920, 0.180482, -0.070847, 0.176846, -0.048905, 0.205935, 0.014443, 0.274582, 0.018210, 0.327197, -0.019137, 0.361813, -0.002970, 0.435481, -0.026165,
    0.460210, -0.021211, 0.460210, -0.021211, 0.460210, -0.021211, 0.448013, -0.066295, 0.435421, -0.087394, 0.418701, -0.104274, 0.407645, -0.112860, 0.360107, -0.137772, 0.329499, -0.150428, 0.309776, -0.149624, 0.285350, -0.143122, 0.261528, -0.132141, 0.251586, -0.118897, 0.239201, -0.117955, 0.229522, -0.112141, 0.216811, -0.103711, 0.201758, -0.097527, 0.193249, -0.082779, 0.186566, -0.069670, 0.180869, -0.050688, 0.204854, 0.020507, 0.263846, 0.019365, 0.317800, -0.003973, 0.356089, -0.011340, 0.439761, -0.029672,
    0.434748, -0.000838, 0.434748, -0.000838, 0.434748, -0.000838, 0.430284, -0.034286, 0.422394, -0.053042, 0.410215, -0.071002, 0.402745, -0.080997, 0.369926, -0.113590, 0.344731, -0.127619, 0.326033, -0.131841, 0.303417, -0.134510, 0.271776, -0.128114, 0.256583, -0.115011, 0.243783, -0.111150, 0.235835, -0.103788, 0.224008, -0.098372, 0.209739, -0.095034, 0.202595, -0.080090, 0.194537, -0.069929, 0.185874, -0.050665, 0.210923, 0.011579, 0.273900, 0.022828, 0.324171, 0.021713, 0.359434, -0.011990, 0.450650, -0.021243,
    0.383085, 0.043442, 0.383085, 0.043442, 0.383085, 0.043442, 0.380414, 0.010938, 0.377464, -0.004055, 0.372971, -0.019058, 0.370715, -0.027539, 0.359262, -0.065675, 0.338702, -0.083592, 0.322434, -0.090844, 0.304043, -0.095765, 0.286529, -0.092077, 0.278096, -0.091197, 0.265728, -0.098044, 0.251620, -0.102555, 0.235472, -0.098097, 0.216942, -0.095596, 0.207030, -0.080624, 0.198985, -0.069416, 0.188508, -0.052270, 0.211719, 0.014115, 0.267162, 0.025110, 0.315115, 0.001495, 0.352361, 0.022502, 0.434965, -0.019058,
    0.379391, 0.038723, 0.379391, 0.038723, 0.379391, 0.038723, 0.378973, 0.010004, 0.376774, -0.005503, 0.371783, -0.019989, 0.368208, -0.028516, 0.354596, -0.065560, 0.340937, -0.083424, 0.320502, -0.093335, 0.299686, -0.097099, 0.280010, -0.094501, 0.268308, -0.087263, 0.258354, -0.088328, 0.248524, -0.093115, 0.237108, -0.089596, 0.220215, -0.090690, 0.210622, -0.076731, 0.200717, -0.068470, 0.188885, -0.050488, 0.209676, 0.015411, 0.265063, 0.023565, 0.323223, 0.006821, 0.357862, -0.004793, 0.449132, -0.021923,
    0.323004, 0.067696, 0.323004, 0.067696, 0.323004, 0.067696, 0.331318, 0.048107, 0.334009, 0.037058, 0.335142, 0.025171, 0.335609, 0.018127, 0.338337, -0.015070, 0.329885, -0.036441, 0.323975, -0.049894, 0.306829, -0.058774, 0.292757, -0.060067, 0.286992, -0.064255, 0.279480, -0.073778, 0.269819, -0.081733, 0.254632, -0.083760, 0.234014, -0.090030, 0.221601, -0.077301, 0.209124, -0.070562, 0.193576, -0.050730, 0.209586, 0.015885, 0.257029, 0.035141, 0.304262, 0.000129, 0.346536, -0.003520, 0.448482, -0.031830,
    0.298356, 0.072237, 0.298356, 0.072237, 0.298356, 0.072237, 0.313837, 0.058903, 0.318560, 0.048825, 0.321279, 0.037440, 0.322716, 0.030312, 0.329856, -0.002606, 0.327224, -0.018554, 0.320286, -0.030288, 0.310371, -0.040872, 0.294345, -0.051831, 0.291500, -0.057215, 0.285175, -0.067409, 0.273934, -0.080790, 0.258743, -0.081525, 0.238868, -0.088069, 0.226820, -0.078709, 0.215204, -0.070839, 0.195590, -0.054339, 0.210468, 0.011459, 0.268867, 0.035267, 0.318303, 0.017455, 0.341432, 0.001838, 0.444888, -0.039792,
    0.244207, 0.091487, 0.244207, 0.091487, 0.244207, 0.091487, 0.260275, 0.088302, 0.266629, 0.082410, 0.274160, 0.076404, 0.280715, 0.072438, 0.308468, 0.051583, 0.309359, 0.027746, 0.313147, 0.015024, 0.309517, -0.000669, 0.303928, -0.009974, 0.304070, -0.026316, 0.299458, -0.046653, 0.291327, -0.061113, 0.276800, -0.068315, 0.255423, -0.078976, 0.240026, -0.073524, 0.227369, -0.066649, 0.206322, -0.051532, 0.216020, 0.015849, 0.263830, 0.010769, 0.296239, -0.008536, 0.333242, 0.010132, 0.447163, -0.026419,
    0.183422, 0.102682, 0.183422, 0.102682, 0.183422, 0.102682, 0.189379, 0.093359, 0.215484, 0.107327, 0.222574, 0.106080, 0.266195, 0.076967, 0.274955, 0.090208, 0.277522, 0.073389, 0.289466, 0.049241, 0.284039, 0.051730, 0.296197, 0.033912, 0.308767, 0.010977, 0.313345, -0.007452, 0.301331, -0.031789, 0.279749, -0.045405, 0.263548, -0.058742, 0.260133, -0.057556, 0.255978, -0.055200, 0.243935, -0.015426, 0.263520, 0.020285, 0.306427, -0.010655, 0.293320, -0.045038, 0.316639, 0.043065, 0.479990, 0.029286,
    0.202543, 0.109242, 0.202543, 0.109242, 0.202543, 0.109242, 0.206496, 0.108684, 0.214924, 0.108180, 0.224776, 0.106749, 0.231195, 0.105300, 0.265896, 0.093116, 0.284872, 0.083182, 0.301843, 0.068490, 0.307924, 0.049366, 0.310504, 0.034130, 0.317831, 0.008491, 0.319317, -0.014715, 0.315205, -0.040572, 0.303920, -0.050272, 0.283188, -0.070195, 0.265415, -0.073314, 0.248808, -0.075125, 0.219038, -0.066436, 0.221675, -0.003413, 0.252944, 0.017886, 0.282463, 0.035563, 0.319897, -0.013269, 0.443913, -0.005008,
    0.141835, 0.100033, 0.141835, 0.100033, 0.141835, 0.100033, 0.134897, 0.102062, 0.144513, 0.105898, 0.183152, 0.116624, 0.215819, 0.103883, 0.228431, 0.116136, 0.239341, 0.109413, 0.256909, 0.100681, 0.266766, 0.108760, 0.301960, 0.100806, 0.327329, 0.083957, 0.344437, 0.055207, 0.344894, 0.018786, 0.328706, 0.003095, 0.306833, -0.008938, 0.285914, -0.027105, 0.264766, -0.046518, 0.242100, -0.035122, 0.273557, -0.006394, 0.315992, -0.009389, 0.309487, -0.047431, 0.322552, 0.041759, 0.492140, 0.021756,
    0.083161, 0.079116, 0.083161, 0.079116, 0.083161, 0.079116, 0.095036, 0.099359, 0.109381, 0.106674, 0.128360, 0.116403, 0.160601, 0.137272, 0.172001, 0.140205, 0.182756, 0.133665, 0.202459, 0.143876, 0.220568, 0.151096, 0.251437, 0.159976, 0.293609, 0.151987, 0.327906, 0.119550, 0.344613, 0.082096, 0.351387, 0.043155, 0.353055, -0.003130, 0.344092, -0.033973, 0.326235, -0.027956, 0.294706, -0.009674, 0.292892, 0.017523, 0.317814, -0.010663, 0.305613, -0.052271, 0.312295, 0.030537, 0.479417, 0.025482,
    0.070808, 0.089661, 0.070808, 0.089661, 0.070808, 0.089661, 0.097323, 0.095242, 0.102631, 0.108449, 0.101927, 0.109285, 0.143483, 0.139029, 0.160656, 0.144643, 0.177485, 0.125107, 0.204176, 0.137844, 0.208413, 0.149404, 0.237979, 0.155978, 0.286576, 0.140440, 0.333043, 0.114430, 0.366480, 0.086590, 0.386247, 0.043944, 0.383128, -0.005632, 0.352648, -0.026880, 0.308233, -0.044169, 0.265808, -0.027941, 0.293856, 0.007937, 0.329614, -0.015089, 0.302518, -0.048287, 0.320308, 0.036585, 0.459523, 0.031495,
    0.047183, 0.071596, 0.047183, 0.071596, 0.047183, 0.071596, 0.072652, 0.096997, 0.070580, 0.106390, 0.067379, 0.119179, 0.094037, 0.123986, 0.126910, 0.154072, 0.142319, 0.149821, 0.151377, 0.157884, 0.162124, 0.167719, 0.193120, 0.185350, 0.254091, 0.178979, 0.311312, 0.171867, 0.362816, 0.146635, 0.393951, 0.087345, 0.388996, 0.039183, 0.364126, -0.005150, 0.339093, -0.019951, 0.304760, -0.023473, 0.306394, -0.000773, 0.340142, -0.001652, 0.337883, -0.045135, 0.331364, 0.012240, 0.471805, -0.005085,
    0.003256, 0.051993, 0.003256, 0.051993, 0.003256, 0.051993, 0.005512, 0.061986, 0.024026, 0.086668, 0.019745, 0.097110, 0.049074, 0.096030, 0.055083, 0.111426, 0.051848, 0.123484, 0.044940, 0.146032, 0.059741, 0.157508, 0.079729, 0.179560, 0.104917, 0.210848, 0.156030, 0.231107, 0.210881, 0.254416, 0.266372, 0.282109, 0.325978, 0.293122, 0.401976, 0.239640, 0.437762, 0.182184, 0.446189, 0.038536, 0.430943, 0.021088, 0.449679, -0.001897, 0.412405, -0.128959, 0.315484, -0.034134, 0.461701, 0.033060,
};
#else
static const float pz_table[] = {
    0.904588, -0.281585, 0.904588, -0.281585, 0.904588, -0.281585, 0.826906, -0.325790, 0.758317, -0.347613, 0.701328, -0.390063, 0.622778, -0.429432, 0.553451, -0.415429, 0.515797, -0.415245, 0.465848, -0.411902, 0.416490, -0.384796, 0.388386, -0.356016, 0.332204, -0.363366, 0.285714, -0.340387, 0.218257, -0.329625, 0.216694, -0.278197, 0.180420, -0.258764, 0.161557, -0.240649, 0.164468, -0.214250, 0.154505, -0.159521, 0.186851, -0.115622, 0.157447, -0.143895, 0.117102, -0.096500, 0.115814, -0.008488, 0.138631, 0.066805,
    0.901838, -0.290487, 0.901838, -0.290487, 0.901838, -0.290487, 0.852057, -0.352836, 0.796775, -0.395425, 0.723958, -0.448147, 0.653457, -0.468210, 0.595071, -0.478707, 0.552938, -0.482546, 0.489192, -0.465040, 0.458740, -0.471949, 0.412065, -0.462497, 0.336601, -0.479551, 0.281030, -0.465631, 0.197413, -0.453476, 0.158119, -0.421606, 0.108885, -0.401891, 0.119060, -0.368471, 0.099467, -0.346346, 0.096960, -0.312012, 0.128612, -0.305918, 0.063970, -0.332566, 0.049804, -0.299354, 0.040595, -0.288293, 0.102475, -0.320542,
    0.947796, -0.307507, 0.947796, -0.307507, 0.947796, -0.307507, 0.890848, -0.347634, 0.833460, -0.370129, 0.753433, -0.439604, 0.695578, -0.471291, 0.638787, -0.487218, 0.595889, -0.513909, 0.531739, -0.513174, 0.486311, -0.506077, 0.413920, -0.473535, 0.344392, -0.495412, 0.296407, -0.487840, 0.237279, -0.476596, 0.221666, -0.437085, 0.171596, -0.429098, 0.140975, -0.415428, 0.121475, -0.384790, 0.110580, -0.333497, 0.146643, -0.337116, 0.050630, -0.386401, 0.020895, -0.352026, 0.045583, -0.346609, 0.084691, -0.303916,
    0.964913, -0.239177, 0.964913, -0.239177, 0.964913, -0.239177, 0.930953, -0.288947, 0.878118, -0.331583, 0.832267, -0.361061, 0.768139, -0.425154, 0.718190, -0.452238, 0.677815, -0.458959, 0.615812, -0.467220, 0.569602, -0.471638, 0.525427, -0.474630, 0.456317, -0.496822, 0.363449, -0.514440, 0.283570, -0.500281, 0.242948, -0.458597, 0.194099, -0.431708, 0.159543, -0.402539, 0.146189, -0.362833, 0.154718, -0.286495, 0.204914, -0.246820, 0.177232, -0.292957, 0.191579, -0.251920, 0.186732, -0.208121, 0.324421, -0.106635,
    0.993164, -0.248336, 0.993164, -0.248336, 0.993164, -0.248336, 0.941673, -0.309832, 0.907815, -0.369033, 0.832070, -0.419304, 0.769299, -0.468847, 0.730041, -0.499339, 0.658367, -0.520965, 0.601585, -0.539255, 0.553562, -0.537280, 0.496217, -0.513909, 0.426729, -0.555966, 0.331203, -0.577961, 0.204344, -0.575841, 0.176484, -0.511782, 0.137843, -0.464357, 0.097935, -0.434417, 0.081655, -0.401435, 0.080104, -0.349198, 0.103338, -0.342607, 0.063858, -0.389171, 0.049871, -0.358335, 0.033027, -0.309146, 0.053931, -0.305981,
    1.017340, -0.231218, 1.017340, -0.231218, 1.017340, -0.231218, 0.971124, -0.294737, 0.962816, -0.361893, 0.895732, -0.427333, 0.854678, -0.479356, 0.791154, -0.513138, 0.728443, -0.536759, 0.673056, -0.557741, 0.634434, -0.571171, 0.542197, -0.574595, 0.452205, -0.622679, 0.334009, -0.645919, 0.230125, -0.624661, 0.180853, -0.568433, 0.102896, -0.529188, 0.104033, -0.485668, 0.080495, -0.444115, 0.057041, -0.379704, 0.077781, -0.368871, 0.060405, -0.394729, 0.017428, -0.363949, -0.002146, -0.344730, -0.018181, -0.300923,
    1.012340, -0.226670, 1.012340, -0.226670, 1.012340, -0.226670, 0.995314, -0.290366, 0.957238, -0.344499, 0.892897, -0.432186, 0.855869, -0.480983, 0.804703, -0.513051, 0.749586, -0.540453, 0.676736, -0.561333, 0.629743, -0.563726, 0.525862, -0.578451, 0.450858, -0.617487, 0.336203, -0.638287, 0.228373, -0.615973, 0.169535, -0.569585, 0.118862, -0.529806, 0.102116, -0.483314, 0.068131, -0.435320, 0.051009, -0.363140, 0.074986, -0.356453, 0.042380, -0.403127, 0.025333, -0.359908, 0.036972, -0.358510, -0.012043, -0.328519,
    1.054280, -0.209524, 1.054280, -0.209524, 1.054280, -0.209524, 1.058210, -0.259541, 1.043760, -0.324593, 0.991038, -0.416254, 0.959141, -0.480144, 0.897937, -0.527564, 0.837175, -0.564759, 0.762032, -0.604779, 0.709009, -0.618945, 0.593922, -0.643331, 0.499678, -0.680927, 0.385808, -0.701909, 0.239249, -0.699252, 0.196587, -0.641952, 0.146920, -0.597669, 0.087092, -0.556983, 0.059740, -0.502847, 0.026567, -0.417771, 0.064226, -0.388804, 0.015261, -0.424893, -0.036417, -0.381760, -0.005634, -0.328578, 0.012968, -0.334399,
    1.101050, -0.176725, 1.101050, -0.176725, 1.101050, -0.176725, 1.091050, -0.239695, 1.066740, -0.299491, 1.039830, -0.375631, 1.008170, -0.435759, 0.963284, -0.503908, 0.903996, -0.555605, 0.848019, -0.611867, 0.793801, -0.629109, 0.685504, -0.676269, 0.556996, -0.744026, 0.420155, -0.774965, 0.279455, -0.766061, 0.188998, -0.719741, 0.123460, -0.662024, 0.063418, -0.598502, 0.058500, -0.535153, 0.014380, -0.450293, 0.061452, -0.428704, -0.024230, -0.464808, -0.059219, -0.395251, -0.040271, -0.313851, -0.008428, -0.296303,
    1.128090, -0.172841, 1.128090, -0.172841, 1.128090, -0.172841, 1.071050, -0.217076, 1.075580, -0.286155, 1.066110, -0.342136, 1.057530, -0.422350, 1.035370, -0.474373, 0.986236, -0.537269, 0.915174, -0.605340, 0.861730, -0.653057, 0.735439, -0.712116, 0.607318, -0.804386, 0.445873, -0.854913, 0.323611, -0.832439, 0.208380, -0.785526, 0.076638, -0.742262, 0.056360, -0.681532, 0.025650, -0.610451, -0.034783, -0.488151, -0.000230, -0.449543, -0.030855, -0.471210, -0.118969, -0.401954, -0.071383, -0.288816, 0.038245, -0.282488,
    1.112750, -0.124177, 1.112750, -0.124177, 1.112750, -0.124177, 1.116350, -0.182309, 1.118720, -0.224155, 1.105610, -0.313912, 1.101180, -0.401269, 1.077800, -0.449579, 1.043450, -0.514135, 0.992405, -0.581168, 0.928982, -0.625353, 0.836396, -0.679454, 0.731858, -0.799638, 0.556973, -0.888869, 0.346348, -0.913935, 0.228964, -0.855860, 0.153181, -0.784103, 0.102515, -0.711966, 0.046719, -0.647167, -0.026101, -0.545453, -0.000996, -0.500632, -0.062457, -0.512646, -0.113177, -0.436255, -0.086070, -0.340234, -0.051671, -0.293252,
    1.110170, -0.070866, 1.110170, -0.070866, 1.110170, -0.070866, 1.131620, -0.107675, 1.157940, -0.155592, 1.162710, -0.244230, 1.159650, -0.321235, 1.162420, -0.375076, 1.162510, -0.452263, 1.152590, -0.534703, 1.113120, -0.611975, 0.994637, -0.725004, 0.880017, -0.872888, 0.686483, -1.008850, 0.480900, -1.069370, 0.304141, -1.055820, 0.134489, -0.997712, 0.084539, -0.899165, 0.007331, -0.801096, -0.132474, -0.636373, -0.094722, -0.573595, -0.160838, -0.564226, -0.192735, -0.477315, -0.173015, -0.293337, -0.034052, -0.274123,
    1.141200, -0.075714, 1.141200, -0.075714, 1.141200, -0.075714, 1.156100, -0.131641, 1.175870, -0.181481, 1.172090, -0.249854, 1.189520, -0.332242, 1.185530, -0.388219, 1.173320, -0.451297, 1.132150, -0.539688, 1.095200, -0.609473, 1.006250, -0.717908, 0.872339, -0.878961, 0.697235, -0.988095, 0.456233, -1.049350, 0.314737, -1.009710, 0.110800, -0.962191, 0.097272, -0.872192, 0.081878, -0.773580, 0.035890, -0.646840, -0.051830, -0.619789, -0.168730, -0.616801, -0.248130, -0.473753, -0.131902, -0.302927, -0.066238, -0.309842,
    1.140940, -0.080510, 1.140940, -0.080510, 1.140940, -0.080510, 1.149960, -0.128394, 1.160860, -0.166753, 1.165810, -0.243887, 1.199400, -0.322194, 1.194620, -0.375823, 1.181930, -0.433499, 1.140940, -0.527202, 1.102840, -0.599500, 1.028700, -0.699990, 0.894394, -0.871771, 0.701144, -1.007190, 0.483714, -1.059460, 0.337781, -1.004160, 0.134246, -0.949584, 0.111390, -0.870422, 0.071584, -0.791653, 0.046995, -0.646859, -0.050203, -0.617682, -0.192386, -0.636167, -0.225791, -0.506886, -0.116815, -0.346964, -0.077908, -0.307905,
    1.141140, -0.074223, 1.141140, -0.074223, 1.141140, -0.074223, 1.150770, -0.112152, 1.174950, -0.157836, 1.180020, -0.219980, 1.192460, -0.302176, 1.202490, -0.359397, 1.195890, -0.415040, 1.165780, -0.506787, 1.136800, -0.570267, 1.051280, -0.694484, 0.941092, -0.859154, 0.780449, -0.978259, 0.540708, -1.059100, 0.343546, -1.052060, 0.140682, -1.020720, 0.106792, -0.944044, 0.109045, -0.852092, -0.010876, -0.723435, -0.037772, -0.646640, -0.167087, -0.638738, -0.250604, -0.500240, -0.128424, -0.335599, -0.075270, -0.268032,
    1.147330, -0.070696, 1.147330, -0.070696, 1.147330, -0.070696, 1.156290, -0.108395, 1.177550, -0.160062, 1.191750, -0.215933, 1.222490, -0.287812, 1.225430, -0.340126, 1.221780, -0.400882, 1.206590, -0.484394, 1.174120, -0.559777, 1.099960, -0.675745, 0.973731, -0.885727, 0.807505, -1.023930, 0.572827, -1.110360, 0.387714, -1.096920, 0.183158, -1.063120, 0.102281, -0.981966, 0.090235, -0.877770, 0.033848, -0.730209, -0.080838, -0.671234, -0.188309, -0.662035, -0.280080, -0.508177, -0.153793, -0.311472, -0.072006, -0.291335,
    1.147770, -0.051689, 1.147770, -0.051689, 1.147770, -0.051689, 1.151570, -0.073955, 1.173890, -0.111413, 1.188080, -0.158154, 1.237910, -0.215042, 1.257870, -0.272169, 1.267420, -0.320252, 1.253140, -0.394336, 1.257760, -0.459514, 1.216610, -0.611661, 1.169690, -0.823827, 1.029400, -1.029260, 0.806372, -1.188110, 0.625106, -1.226940, 0.320691, -1.260550, 0.174720, -1.194830, 0.116115, -1.090770, -0.062157, -0.884148, -0.137890, -0.764703, -0.312496, -0.729056, -0.354350, -0.563438, -0.229725, -0.332289, -0.145294, -0.326265,
    1.141560, -0.018528, 1.141560, -0.018528, 1.141560, -0.018528, 1.150070, -0.034951, 1.177250, -0.058908, 1.186450, -0.084196, 1.246400, -0.132060, 1.272440, -0.162630, 1.286380, -0.194403, 1.313420, -0.255348, 1.317740, -0.332026, 1.321850, -0.440132, 1.362330, -0.642046, 1.330960, -0.877350, 1.216450, -1.112890, 1.039850, -1.314510, 0.679594, -1.521010, 0.478451, -1.522210, 0.289652, -1.425540, -0.023604, -1.167130, -0.187498, -0.986680, -0.363903, -0.928149, -0.469416, -0.700408, -0.312212, -0.426688, -0.244460, -0.362985,
    1.139130, -0.010154, 1.139130, -0.010154, 1.139130, -0.010154, 1.147820, -0.023498, 1.173060, -0.046369, 1.187500, -0.068432, 1.238220, -0.099386, 1.258040, -0.113670, 1.284450, -0.138560, 1.316130, -0.192057, 1.331660, -0.238776, 1.359660, -0.345447, 1.414510, -0.523554, 1.443560, -0.705405, 1.402110, -0.967389, 1.306450, -1.235370, 1.047180, -1.548220, 0.789876, -1.682990, 0.512615, -1.668580, 0.077066, -1.428430, -0.256742, -1.203430, -0.452794, -1.122790, -0.508820, -0.871961, -0.448571, -0.483712, -0.378105, -0.400068,
};
static const float sz_table[] = {
    0.744430, -0.049920, 0.744430, -0.049920, 0.744430, -0.049920, 0.710691, -0.174967, 0.637860, -0.260346, 0.595283, -0.294311, 0.471312, -0.324691, 0.430189, -0.350105, 0.389392, -0.336792, 0.349079, -0.304797, 0.327122, -0.316720, 0.264575, -0.301724, 0.215539, -0.283443, 0.178486, -0.256544, 0.148187, -0.225957, 0.127266, -0.192901, 0.119937, -0.159745, 0.111225, -0.133890, 0.108947, -0.105568, 0.124451, -0.052002, 0.160519, -0.017113, 0.207866, -0.006934, 0.238059, -0.010438, 0.288627, 0.002718, 0.364839, 0.003386,
    0.688948, -0.169781, 0.688948, -0.169781, 0.688948, -0.169781, 0.648918, -0.226468, 0.616966, -0.259310, 0.575871, -0.288175, 0.548540, -0.302079, 0.433832, -0.331075, 0.376953, -0.333344, 0.338213, -0.327713, 0.306131, -0.307865, 0.267740, -0.298690, 0.213110, -0.272185, 0.179519, -0.245178, 0.147479, -0.221336, 0.126496, -0.190899, 0.117858, -0.156549, 0.111644, -0.127926, 0.109640, -0.104107, 0.118023, -0.066687, 0.178013, -0.004531, 0.271441, -0.005234, 0.345972, -0.041467, 0.367204, -0.022502, 0.414839, -0.018840,
    0.666202, -0.121070, 0.666202, -0.121070, 0.666202, -0.121070, 0.634286, -0.181778, 0.608993, -0.215579, 0.575828, -0.245982, 0.555717, -0.262253, 0.449456, -0.300668, 0.392473, -0.312123, 0.361235, -0.313726, 0.324604, -0.297054, 0.286462, -0.295783, 0.220341, -0.273168, 0.189409, -0.242037, 0.161096, -0.215548, 0.134731, -0.189989, 0.125417, -0.157640, 0.120172, -0.129878, 0.114774, -0.109362, 0.124671, -0.070586, 0.180068, 0.000296, 0.274845, -0.004085, 0.344058, -0.043111, 0.349330, -0.070269, 0.386669, -0.057381,
    0.572678, -0.055307, 0.572678, -0.055307, 0.572678, -0.055307, 0.564180, -0.109728, 0.547182, -0.140847, 0.521518, -0.169053, 0.504145, -0.184128, 0.426287, -0.222670, 0.392300, -0.238950, 0.361613, -0.247056, 0.332682, -0.241966, 0.301802, -0.244346, 0.247363, -0.234607, 0.214120, -0.218861, 0.178063, -0.207825, 0.150489, -0.185724, 0.134926, -0.156034, 0.126384, -0.128256, 0.122352, -0.103981, 0.124823, -0.063403, 0.174680, -0.007478, 0.255295, -0.017765, 0.322530, 0.004959, 0.335346, -0.033147, 0.390069, -0.050356,
    0.582568, -0.056316, 0.582568, -0.056316, 0.582568, -0.056316, 0.565643, -0.107119, 0.549562, -0.135581, 0.526677, -0.164576, 0.511297, -0.181148, 0.439218, -0.228230, 0.397777, -0.244692, 0.365500, -0.252341, 0.331596, -0.244039, 0.300611, -0.247076, 0.249540, -0.238424, 0.214076, -0.226866, 0.175695, -0.217125, 0.150620, -0.191580, 0.128074, -0.165700, 0.122462, -0.133453, 0.118270, -0.106449, 0.113006, -0.068852, 0.158348, -0.005142, 0.237885, -0.002008, 0.302619, -0.024256, 0.325631, -0.015287, 0.348670, -0.051116,
    0.514834, 0.009658, 0.514834, 0.009658, 0.514834, 0.009658, 0.518262, -0.038948, 0.512527, -0.067060, 0.500711, -0.095337, 0.491466, -0.111462, 0.440029, -0.168633, 0.407711, -0.199131, 0.381099, -0.209186, 0.352187, -0.209325, 0.324965, -0.217852, 0.272311, -0.222938, 0.231086, -0.219676, 0.193500, -0.209423, 0.164342, -0.187702, 0.143054, -0.160669, 0.131802, -0.131694, 0.123318, -0.109319, 0.124511, -0.068408, 0.166868, -0.004557, 0.242014, 0.007246, 0.296900, -0.010218, 0.331462, -0.034749, 0.377320, -0.056848,
    0.521413, 0.007614, 0.521413, 0.007614, 0.521413, 0.007614, 0.520687, -0.036205, 0.512886, -0.064291, 0.500690, -0.092984, 0.493150, -0.109539, 0.443871, -0.166025, 0.411316, -0.194878, 0.385838, -0.207634, 0.353496, -0.209105, 0.324847, -0.216998, 0.273367, -0.222660, 0.238675, -0.214812, 0.196352, -0.211187, 0.165401, -0.190164, 0.143213, -0.162963, 0.131355, -0.134735, 0.124152, -0.110366, 0.122387, -0.068662, 0.169284, -0.008093, 0.239602, 0.009361, 0.301968, -0.041540, 0.340144, -0.047405, 0.386374, -0.054004,
    0.438963, 0.072186, 0.438963, 0.072186, 0.438963, 0.072186, 0.453590, 0.043187, 0.460345, 0.021731, 0.464234, -0.004251, 0.466463, -0.021584, 0.449948, -0.092519, 0.430394, -0.128731, 0.410850, -0.150510, 0.379631, -0.164674, 0.356524, -0.188721, 0.302067, -0.205973, 0.264502, -0.205825, 0.218073, -0.209504, 0.183778, -0.191140, 0.158587, -0.164883, 0.142431, -0.138206, 0.137771, -0.108646, 0.131786, -0.073524, 0.176937, -0.015120, 0.243127, 0.019237, 0.305347, -0.017890, 0.331259, -0.040878, 0.363732, -0.043311,
    0.378566, 0.103204, 0.378566, 0.103204, 0.378566, 0.103204, 0.393477, 0.078758, 0.404371, 0.063196, 0.412721, 0.042572, 0.417171, 0.028815, 0.434181, -0.034787, 0.418210, -0.076128, 0.402903, -0.102972, 0.380912, -0.114479, 0.364722, -0.141322, 0.321738, -0.173330, 0.281123, -0.191918, 0.236213, -0.201129, 0.200721, -0.184721, 0.169353, -0.162338, 0.150745, -0.135592, 0.141974, -0.108840, 0.135658, -0.069241, 0.176545, -0.005379, 0.230112, -0.002545, 0.302630, 0.008537, 0.314591, 0.000121, 0.394535, -0.030762,
    0.326103, 0.127066, 0.326103, 0.127066, 0.326103, 0.127066, 0.350285, 0.108903, 0.364865, 0.096569, 0.378504, 0.081676, 0.386733, 0.071054, 0.409041, 0.010734, 0.417689, -0.032158, 0.411895, -0.058024, 0.397143, -0.079903, 0.385893, -0.114992, 0.342225, -0.159956, 0.305721, -0.179118, 0.257872, -0.196448, 0.217661, -0.185602, 0.179665, -0.169597, 0.159124, -0.142876, 0.147609, -0.116452, 0.135105, -0.076800, 0.177469, -0.005129, 0.240215, 0.005969, 0.294194, -0.018075, 0.321837, -0.022248, 0.380890, -0.013630,
    0.275899, 0.134497, 0.275899, 0.134497, 0.275899, 0.134497, 0.302636, 0.118440, 0.318310, 0.109506, 0.331216, 0.099612, 0.338951, 0.092832, 0.380707, 0.034597, 0.380894, 0.001415, 0.379064, -0.023135, 0.374435, -0.035309, 0.369650, -0.060888, 0.349897, -0.111176, 0.318586, -0.151039, 0.274815, -0.177644, 0.233074, -0.172868, 0.192064, -0.161191, 0.171227, -0.133020, 0.161716, -0.103847, 0.148365, -0.066577, 0.186056, -0.009044, 0.241651, 0.003645, 0.266718, -0.031278, 0.313123, -0.022236, 0.386460, -0.049550,
    0.194214, 0.144271, 0.194214, 0.144271, 0.194214, 0.144271, 0.218941, 0.146494, 0.234473, 0.145360, 0.251662, 0.140949, 0.262944, 0.136964, 0.316017, 0.111983, 0.342814, 0.093011, 0.352872, 0.073576, 0.368851, 0.050558, 0.390262, 0.014156, 0.384854, -0.053454, 0.364556, -0.104998, 0.324019, -0.155552, 0.281723, -0.163088, 0.231799, -0.164524, 0.199054, -0.145274, 0.184574, -0.115376, 0.158363, -0.085305, 0.201170, -0.017313, 0.235922, 0.023300, 0.264582, 0.018347, 0.286481, -0.005232, 0.347674, -0.031626,
    0.144678, 0.159078, 0.144678, 0.159078, 0.144678, 0.159078, 0.191913, 0.150198, 0.214093, 0.156692, 0.262708, 0.116904, 0.302907, 0.128055, 0.304019, 0.125650, 0.311915, 0.102108, 0.355345, 0.072986, 0.360464, 0.061951, 0.379552, 0.013268, 0.383349, -0.033528, 0.365961, -0.092465, 0.321147, -0.135073, 0.276103, -0.131365, 0.233669, -0.127572, 0.199410, -0.127631, 0.181706, -0.111955, 0.176358, -0.057845, 0.206383, -0.012467, 0.249757, -0.038226, 0.264648, -0.044890, 0.272099, 0.000439, 0.359485, 0.011039,
    0.141531, 0.140309, 0.141531, 0.140309, 0.141531, 0.140309, 0.183931, 0.159980, 0.212108, 0.143043, 0.248724, 0.156260, 0.267774, 0.121691, 0.307025, 0.122507, 0.314216, 0.107590, 0.347848, 0.076380, 0.354779, 0.067091, 0.385843, 0.014076, 0.379331, -0.042674, 0.358276, -0.084231, 0.318649, -0.121253, 0.279943, -0.141183, 0.246962, -0.155561, 0.216983, -0.151470, 0.193663, -0.123564, 0.177301, -0.048512, 0.207903, -0.025714, 0.261871, -0.003849, 0.259914, -0.012990, 0.283816, 0.006573, 0.369251, -0.017756,
    0.134553, 0.133865, 0.134553, 0.133865, 0.134553, 0.133865, 0.164462, 0.138622, 0.200029, 0.147619, 0.227316, 0.157363, 0.285845, 0.142180, 0.289205, 0.143661, 0.302208, 0.094085, 0.326100, 0.097709, 0.343463, 0.080503, 0.363917, 0.043714, 0.378888, 0.001901, 0.378281, -0.049976, 0.354734, -0.101775, 0.318012, -0.119597, 0.277347, -0.122271, 0.241786, -0.121259, 0.220752, -0.102760, 0.198289, -0.039123, 0.207856, -0.009533, 0.245572, -0.029074, 0.251003, -0.047617, 0.292592, -0.000957, 0.374899, -0.029862,
    0.115075, 0.137009, 0.115075, 0.137009, 0.115075, 0.137009, 0.148258, 0.148317, 0.173048, 0.170451, 0.208808, 0.153535, 0.251679, 0.135314, 0.256442, 0.130397, 0.280229, 0.106384, 0.316445, 0.090278, 0.337442, 0.077970, 0.366182, 0.046493, 0.375705, 0.004153, 0.370393, -0.045348, 0.339282, -0.102396, 0.286412, -0.137673, 0.247543, -0.122800, 0.222031, -0.109712, 0.211736, -0.096027, 0.198034, -0.051735, 0.214562, -0.000393, 0.241925, -0.014169, 0.242260, -0.043245, 0.273086, 0.001626, 0.381803, 0.009960,
    0.068622, 0.127041, 0.068622, 0.127041, 0.068622, 0.127041, 0.125877, 0.130884, 0.149303, 0.137347, 0.172191, 0.147149, 0.193085, 0.149191, 0.203606, 0.162331, 0.224548, 0.157941, 0.274225, 0.127073, 0.281769, 0.133700, 0.325411, 0.111152, 0.365572, 0.081145, 0.382224, 0.014483, 0.363015, -0.057750, 0.319915, -0.117839, 0.287261, -0.133082, 0.264547, -0.112559, 0.227317, -0.102682, 0.191344, -0.082415, 0.220068, -0.016536, 0.255290, -0.005898, 0.277596, -0.034636, 0.280725, -0.012787, 0.395282, -0.027356,
    0.071242, 0.092756, 0.071242, 0.092756, 0.071242, 0.092756, 0.076057, 0.104535, 0.082615, 0.114937, 0.111498, 0.126481, 0.125987, 0.142658, 0.140756, 0.163131, 0.164184, 0.154507, 0.180476, 0.137572, 0.207930, 0.161657, 0.257648, 0.152814, 0.303503, 0.135741, 0.335939, 0.119533, 0.363970, 0.061864, 0.368033, -0.011661, 0.348062, -0.040366, 0.316933, -0.061730, 0.282328, -0.085270, 0.243427, -0.050106, 0.247552, -0.004408, 0.300600, -0.010801, 0.300286, -0.051925, 0.299293, -0.024201, 0.378333, 0.011726,
    0.023866, 0.092567, 0.023866, 0.092567, 0.023866, 0.092567, 0.035953, 0.103963, 0.060850, 0.118776, 0.071392, 0.134377, 0.101226, 0.136094, 0.118178, 0.151143, 0.122291, 0.162165, 0.135402, 0.164212, 0.160689, 0.171192, 0.211366, 0.179046, 0.249544, 0.181292, 0.289558, 0.168284, 0.321725, 0.128066, 0.327090, 0.099304, 0.328177, 0.050356, 0.321969, -0.029768, 0.303489, -0.067358, 0.263130, -0.018008, 0.304003, 0.015885, 0.347436, 0.003446, 0.310817, -0.100077, 0.305509, -0.051809, 0.358173, -0.030519,
};
#endif


static const float pz_table_r[] = {
    0.930971, -0.113294, 0.930971, -0.113294, 0.930971, -0.113294, 0.919719, -0.198666, 0.921442, -0.282810, 0.918746, -0.290428, 0.888176, -0.369164, 0.835334, -0.483211, 0.786123, -0.539081, 0.726101, -0.626135, 0.682582, -0.630811, 0.494074, -0.660858, 0.350248, -0.660519, 0.271396, -0.619579, 0.189913, -0.578578, 0.065855, -0.537339, 0.059014, -0.474316, 0.023395, -0.414171, -0.013069, -0.352937, 0.077905, -0.284860, 0.106343, -0.279089, 0.091210, -0.305641, -0.006037, -0.308730, -0.052676, -0.241541, -0.029009, -0.145511,
    0.920357, -0.106288, 0.920357, -0.106288, 0.920357, -0.106288, 0.918311, -0.193422, 0.906557, -0.248623, 0.902601, -0.311238, 0.874233, -0.376809, 0.841282, -0.446259, 0.806421, -0.487696, 0.709849, -0.554284, 0.684246, -0.601610, 0.558224, -0.672298, 0.445048, -0.639973, 0.279891, -0.645940, 0.205491, -0.596642, 0.099016, -0.552341, 0.061411, -0.495563, 0.036731, -0.446203, 0.076080, -0.395212, 0.056153, -0.337568, 0.090198, -0.340863, 0.066188, -0.365773, 0.017887, -0.353977, -0.060418, -0.282718, -0.068835, -0.141572,
    0.970713, -0.087260, 0.970713, -0.087260, 0.970713, -0.087260, 0.962899, -0.129586, 0.958439, -0.188585, 0.948524, -0.221452, 0.948382, -0.260812, 0.942936, -0.330379, 0.913994, -0.384947, 0.910856, -0.406402, 0.893370, -0.484880, 0.818234, -0.599046, 0.690242, -0.688978, 0.602872, -0.733390, 0.469564, -0.796491, 0.320095, -0.813578, 0.161060, -0.760422, 0.137598, -0.655577, 0.023190, -0.579030, 0.042458, -0.449638, 0.087058, -0.431653, 0.032182, -0.489150, -0.072039, -0.472841, -0.134293, -0.336729, -0.127482, -0.150504,
    0.994610, -0.059977, 0.994610, -0.059977, 0.994610, -0.059977, 0.981726, -0.073716, 1.002590, -0.106259, 1.006680, -0.126298, 1.021830, -0.199685, 1.036920, -0.242920, 1.042980, -0.272350, 1.036170, -0.346023, 1.040250, -0.394772, 1.022350, -0.493806, 0.953175, -0.689866, 0.891701, -0.800070, 0.740688, -0.931408, 0.479572, -1.040850, 0.345642, -1.006790, 0.143788, -0.958804, 0.013862, -0.881983, -0.046920, -0.680104, -0.055074, -0.573465, -0.065321, -0.594698, -0.143210, -0.511794, -0.187998, -0.371063, -0.209455, -0.162308,
    0.994091, -0.048732, 0.994091, -0.048732, 0.994091, -0.048732, 0.975040, -0.095840, 0.993690, -0.098820, 1.012120, -0.134862, 1.011080, -0.179972, 1.012690, -0.248004, 1.028200, -0.262095, 1.042410, -0.298824, 1.047760, -0.361856, 1.047830, -0.480563, 0.968861, -0.656517, 0.891550, -0.787023, 0.802438, -0.878061, 0.569101, -1.005090, 0.360512, -1.020240, 0.225920, -0.951250, 0.104531, -0.859072, 0.023050, -0.707031, 0.028525, -0.658896, -0.024773, -0.653580, -0.164725, -0.587931, -0.215157, -0.388918, -0.204738, -0.207516,
    0.997769, -0.027192, 0.997769, -0.027192, 0.997769, -0.027192, 1.006740, -0.055357, 1.014260, -0.081495, 1.027640, -0.100203, 1.027200, -0.123215, 1.020340, -0.138407, 1.049980, -0.193844, 1.100370, -0.248979, 1.100700, -0.270594, 1.132850, -0.415034, 1.164140, -0.480753, 1.124010, -0.655658, 1.027640, -0.863758, 0.887837, -1.068640, 0.692019, -1.228040, 0.512880, -1.301460, 0.257533, -1.291310, -0.097414, -0.994767, -0.107874, -0.819408, -0.148942, -0.794317, -0.251240, -0.710504, -0.313049, -0.438561, -0.231301, -0.225236,
};
static const float sz_table_r[] = {
    1.627330, -0.115642, 1.627330, -0.115642, 1.627330, -0.115642, 1.613010, -0.286065, 1.599080, -0.400939, 1.566830, -0.503556, 1.520090, -0.602502, 1.402590, -0.843483, 1.173020, -1.049540, 0.986375, -1.144110, 0.831026, -1.158770, 0.532918, -1.125850, 0.260567, -0.996605, 0.125252, -0.843288, 0.044181, -0.696176, 0.021908, -0.564936, 0.001771, -0.456282, 0.027925, -0.367770, 0.054754, -0.303229, 0.094445, -0.230301, 0.247503, -0.195954, 0.408315, -0.202912, 0.620358, -0.210855, 0.692248, -0.258719, 0.686731, -0.266969,
    1.524950, -0.098461, 1.524950, -0.098461, 1.524950, -0.098461, 1.514920, -0.270292, 1.492570, -0.380695, 1.457380, -0.473972, 1.413930, -0.562267, 1.286580, -0.769276, 1.085540, -0.944623, 0.905988, -1.014230, 0.784660, -1.016520, 0.546264, -0.989677, 0.318303, -0.904727, 0.178301, -0.788820, 0.081054, -0.662868, 0.047652, -0.538013, 0.031162, -0.431762, 0.055229, -0.346135, 0.079267, -0.287744, 0.125050, -0.227400, 0.247005, -0.184007, 0.418014, -0.166982, 0.625884, -0.113724, 0.700424, -0.046342, 0.741095, -0.227618,
    1.083340, 0.109772, 1.083340, 0.109772, 1.083340, 0.109772, 1.096700, -0.007346, 1.094580, -0.077485, 1.086920, -0.133979, 1.076630, -0.187924, 1.044380, -0.324387, 0.971333, -0.452827, 0.889758, -0.521238, 0.837158, -0.547021, 0.729968, -0.599925, 0.589076, -0.644665, 0.459765, -0.656997, 0.331262, -0.639268, 0.249427, -0.569990, 0.151488, -0.498099, 0.133718, -0.409743, 0.129406, -0.338677, 0.135439, -0.246864, 0.251083, -0.173824, 0.404146, -0.129530, 0.539017, -0.079903, 0.595166, -0.142050, 0.593415, -0.218919,
    0.721624, 0.276948, 0.721624, 0.276948, 0.721624, 0.276948, 0.774139, 0.205336, 0.801387, 0.163170, 0.820845, 0.126542, 0.836432, 0.090360, 0.877506, 0.000390, 0.884341, -0.111396, 0.866263, -0.180544, 0.856142, -0.217244, 0.824644, -0.310223, 0.759883, -0.426779, 0.672304, -0.520088, 0.541945, -0.593111, 0.441469, -0.568600, 0.269002, -0.555896, 0.212073, -0.473596, 0.183462, -0.397774, 0.150827, -0.293936, 0.236603, -0.214030, 0.330647, -0.175716, 0.462992, -0.087445, 0.526280, -0.146084, 0.558603, -0.232321,
    0.677296, 0.264742, 0.677296, 0.264742, 0.677296, 0.264742, 0.724962, 0.211322, 0.752918, 0.171888, 0.772688, 0.138103, 0.790794, 0.103329, 0.833693, 0.013778, 0.837751, -0.088237, 0.819774, -0.153893, 0.809801, -0.188858, 0.785674, -0.265527, 0.736329, -0.367999, 0.664714, -0.453832, 0.549773, -0.535373, 0.453825, -0.526864, 0.305431, -0.518937, 0.243944, -0.447281, 0.205473, -0.380500, 0.180176, -0.279468, 0.248199, -0.203559, 0.367264, -0.153706, 0.463260, -0.086116, 0.532736, -0.111427, 0.594151, -0.200843,
    0.438415, 0.319412, 0.438415, 0.319412, 0.438415, 0.319412, 0.498741, 0.289306, 0.536580, 0.268959, 0.566022, 0.249386, 0.594083, 0.227330, 0.659443, 0.167437, 0.699489, 0.090334, 0.704616, 0.042975, 0.712273, 0.014709, 0.728515, -0.050363, 0.735032, -0.137251, 0.731611, -0.217235, 0.694933, -0.332447, 0.651343, -0.377589, 0.514774, -0.481647, 0.411058, -0.483036, 0.316083, -0.450085, 0.213933, -0.342115, 0.269892, -0.235478, 0.347735, -0.181155, 0.413498, -0.116189, 0.464165, -0.141209, 0.501340, -0.204158,
};



void icsd_anc_config_board_init(__icsd_anc_config_data *SD_CFG)
{
    if (SD_CFG) {
        //界面信息配置
        SD_CFG->pnc_times = 1;
        SD_CFG->vld1 = 0;
        SD_CFG->vld2 = 0;
        SD_CFG->sz_pri_thr = 60;
        SD_CFG->bypass_vol = 3;
        SD_CFG->sz_calr_sign = 1;
        SD_CFG->pz_calr_sign = 1;
        SD_CFG->bypass_calr_sign = 1;
        SD_CFG->perf_calr_sign = 1;
        SD_CFG->train_mode = 0;
        SD_CFG->tonel_delay = 900;
        SD_CFG->toner_delay = 1500;
        SD_CFG->pzl_delay = 700;
        SD_CFG->pzr_delay = 1200;
        SD_CFG->ear_recorder = 0;
        SD_CFG->fb_agc_en = 0;
        //其他配置
        SD_CFG->ff_yorder  = ANC_ADAPTIVE_FF_ORDER;
        SD_CFG->fb_yorder  = ANC_ADAPTIVE_FB_ORDER;
        //SD_CFG->cmp_yorder = ANC_ADAPTIVE_CMP_ORDER;
        SD_CFG->tool_ffgain_sign = -1;
        SD_CFG->tool_fbgain_sign = -1;

        if (ICSD_ANC_CPU == ICSD_BR28) {
            printf("ICSD BR28 SEL\n");
            SD_CFG->normal_out_sel_l = BR28_ANC_USER_TRAIN_OUT_SEL_L;
            SD_CFG->normal_out_sel_r = BR28_ANC_USER_TRAIN_OUT_SEL_R;
            SD_CFG->tone_out_sel_l   = BR28_ANC_TONE_TRAIN_OUT_SEL_L;
            SD_CFG->tone_out_sel_r   = BR28_ANC_TONE_TRAIN_OUT_SEL_R;
        } else if (ICSD_ANC_CPU == ICSD_BR50) {
            printf("ICSD BR50 SEL\n");
            SD_CFG->normal_out_sel_l = BR50_ANC_USER_TRAIN_OUT_SEL_L;
            SD_CFG->normal_out_sel_r = BR50_ANC_USER_TRAIN_OUT_SEL_R;
            SD_CFG->tone_out_sel_l   = BR50_ANC_TONE_TRAIN_OUT_SEL_L;
            SD_CFG->tone_out_sel_r   = BR50_ANC_TONE_TRAIN_OUT_SEL_R;
        } else {
            printf("CPU ERR\n");
        }
        /***************************************************/
        /**************** left channel config **************/
        /***************************************************/
        SD_CFG->adpt_cfg.pnc_times = 1;
        // target配置
        SD_CFG->adpt_cfg.cmp_en = tg_cmp_en;
        SD_CFG->adpt_cfg.target_cmp_num = target_cmp_num;
        SD_CFG->adpt_cfg.target_sv = (float *)target_sv;
        SD_CFG->adpt_cfg.target_cmp_dat = (float *) tg_cmp;

        // 算法配置
        SD_CFG->adpt_cfg.IIR_NUM_FLEX = ICSD_IIR_NUM_FLEX;
        SD_CFG->adpt_cfg.IIR_NUM_FIX  = ICSD_IIR_NUM_FIX;

        printf("---------order--------------- %d, %d\n", SD_CFG->adpt_cfg.IIR_NUM_FIX, SD_CFG->adpt_cfg.IIR_NUM_FLEX);

        for (int i = 0; i < 62; i++) {
            SD_CFG->adpt_cfg.Vrange_H[i] = Vrange_left_h[i];
            SD_CFG->adpt_cfg.Vrange_M[i] = Vrange_left_m[i];
            SD_CFG->adpt_cfg.Vrange_L[i] = Vrange_left_l[i];
        }

        for (int i = 0; i < 31; i++) {
            SD_CFG->adpt_cfg.Biquad_init_H[i] = biquad_left_h[i];
            SD_CFG->adpt_cfg.Biquad_init_M[i] = biquad_left_m[i];
            SD_CFG->adpt_cfg.Biquad_init_L[i] = biquad_left_l[i];
        }

        for (int i = 0; i < 10; i++) {
            SD_CFG->adpt_cfg.biquad_type[i] = biquad_type[i];
        }

        for (int i = 0; i < 7; i++) {
            SD_CFG->adpt_cfg.degree_set0[i] = _degree_set0[i];
            SD_CFG->adpt_cfg.degree_set1[i] = _degree_set1[i];
            SD_CFG->adpt_cfg.degree_set2[i] = _degree_set2[i];
        }

        printf("%d <<<<<<<<\n", (int)(SD_CFG->adpt_cfg.Vrange_H[0] * 1000));

        SD_CFG->adpt_cfg.Weight_H = (float *)weight_h;
        SD_CFG->adpt_cfg.Weight_M = (float *)weight_m;
        SD_CFG->adpt_cfg.Weight_L = (float *)weight_l;
        SD_CFG->adpt_cfg.Gold_csv_H = (float *)mse_tar_h;
        SD_CFG->adpt_cfg.Gold_csv_M = (float *)mse_tar_m;
        SD_CFG->adpt_cfg.Gold_csv_L = (float *)mse_tar_l;

        SD_CFG->adpt_cfg.total_gain_adj_begin = total_gain_adj_begin;
        SD_CFG->adpt_cfg.total_gain_adj_end = total_gain_adj_end;
        SD_CFG->adpt_cfg.gain_limit_all = GAIN_LIMIT_ALL;

        printf(">>>>>>>>>>>>>>>>>>>>> %d\n", (int)(SD_CFG->adpt_cfg.Gold_csv_H[0] * 1000));
        printf(">>>>>>>>>>>>>>>>>>>>> %d\n", (int)(SD_CFG->adpt_cfg.Gold_csv_M[0] * 1000));
        printf(">>>>>>>>>>>>>>>>>>>>> %d\n", (int)(SD_CFG->adpt_cfg.Gold_csv_L[0] * 1000));

        // 耳道记忆曲线配置
        SD_CFG->adpt_cfg.mem_curve_nums = mem_curves;
        SD_CFG->adpt_cfg.sz_table = (float *)sz_table;
        SD_CFG->adpt_cfg.pz_table = (float *)pz_table;
        SD_CFG->adpt_cfg.pz_table_cmp = NULL;
        SD_CFG->adpt_cfg.sz_table_cmp = NULL;
#if EXT_PRINTF_DEBUG
        for (int i = 0; i < 60; i++) {
            printf("idx=%d, mse=%d, weight=%d\n", i, (int)SD_CFG->adpt_cfg.Gold_csv_H[i], (int)SD_CFG->adpt_cfg.Weight_H[i]);
        }

        de_vrange_printf(SD_CFG->adpt_cfg.Vrange_H, SD_CFG->adpt_cfg.IIR_NUM_FLEX + SD_CFG->adpt_cfg.IIR_NUM_FIX);
        de_vrange_printf(SD_CFG->adpt_cfg.Vrange_M, SD_CFG->adpt_cfg.IIR_NUM_FLEX + SD_CFG->adpt_cfg.IIR_NUM_FIX);
        de_vrange_printf(SD_CFG->adpt_cfg.Vrange_L, SD_CFG->adpt_cfg.IIR_NUM_FLEX + SD_CFG->adpt_cfg.IIR_NUM_FIX);

        de_biquad_printf(SD_CFG->adpt_cfg.Biquad_init_H, SD_CFG->adpt_cfg.IIR_NUM_FLEX + SD_CFG->adpt_cfg.IIR_NUM_FIX);
        de_biquad_printf(SD_CFG->adpt_cfg.Biquad_init_M, SD_CFG->adpt_cfg.IIR_NUM_FLEX + SD_CFG->adpt_cfg.IIR_NUM_FIX);
        de_biquad_printf(SD_CFG->adpt_cfg.Biquad_init_L, SD_CFG->adpt_cfg.IIR_NUM_FLEX + SD_CFG->adpt_cfg.IIR_NUM_FIX);
#endif

#if TCFG_AUDIO_ANC_CH == (ANC_L_CH | ANC_R_CH)
        /***************************************************/
        /*************** right channel config **************/
        /***************************************************/
        SD_CFG->adpt_cfg_r.pnc_times = 1;
        // target配置
        SD_CFG->adpt_cfg_r.cmp_en = tg_cmp_en;
        SD_CFG->adpt_cfg_r.target_cmp_num = target_cmp_num;
        SD_CFG->adpt_cfg_r.target_sv = (float *)target_sv;
        SD_CFG->adpt_cfg_r.target_cmp_dat = (float *) tg_cmp;

        // 算法配置
        SD_CFG->adpt_cfg_r.IIR_NUM_FLEX = ICSD_IIR_NUM_FLEX;
        SD_CFG->adpt_cfg_r.IIR_NUM_FIX  = ICSD_IIR_NUM_FIX;
        for (int i = 0; i < 62; i++) {
            SD_CFG->adpt_cfg_r.Vrange_H[i] = Vrange_right_h[i];
            SD_CFG->adpt_cfg_r.Vrange_M[i] = Vrange_right_m[i];
            SD_CFG->adpt_cfg_r.Vrange_L[i] = Vrange_right_l[i];
        }

        for (int i = 0; i < 31; i++) {
            SD_CFG->adpt_cfg_r.Biquad_init_H[i] = biquad_right_h[i];
            SD_CFG->adpt_cfg_r.Biquad_init_M[i] = biquad_right_m[i];
            SD_CFG->adpt_cfg_r.Biquad_init_L[i] = biquad_right_l[i];
        }

        for (int i = 0; i < 10; i++) {
            SD_CFG->adpt_cfg_r.biquad_type[i] = biquad_type[i];
        }

        for (int i = 0; i < 7; i++) {
            SD_CFG->adpt_cfg_r.degree_set0[i] = _degree_set0[i];
            SD_CFG->adpt_cfg_r.degree_set1[i] = _degree_set1[i];
            SD_CFG->adpt_cfg_r.degree_set2[i] = _degree_set2[i];
        }

        SD_CFG->adpt_cfg_r.Weight_H = (float *)weight_h;
        SD_CFG->adpt_cfg_r.Weight_M = (float *)weight_m;
        SD_CFG->adpt_cfg_r.Weight_L = (float *)weight_l;
        SD_CFG->adpt_cfg_r.Gold_csv_H = (float *)mse_tar_h;
        SD_CFG->adpt_cfg_r.Gold_csv_M = (float *)mse_tar_m;
        SD_CFG->adpt_cfg_r.Gold_csv_L = (float *)mse_tar_l;

        SD_CFG->adpt_cfg_r.total_gain_adj_begin = total_gain_adj_begin;
        SD_CFG->adpt_cfg_r.total_gain_adj_end = total_gain_adj_end;
        SD_CFG->adpt_cfg_r.gain_limit_all = GAIN_LIMIT_ALL;

        // 耳道记忆曲线配置
        SD_CFG->adpt_cfg_r.mem_curve_nums = mem_curves;
        SD_CFG->adpt_cfg_r.sz_table = (float *)sz_table_r;
        SD_CFG->adpt_cfg_r.pz_table = (float *)pz_table_r;
        SD_CFG->adpt_cfg_r.pz_table_cmp = NULL;
        SD_CFG->adpt_cfg_r.sz_table_cmp = NULL;
#if EXT_PRINTF_DEBUG
        for (int i = 0; i < 60; i++) {
            printf("idx=%d, mse=%d, weight=%d\n", i, (int)SD_CFG->adpt_cfg_r.Gold_csv_H[i], (int)SD_CFG->adpt_cfg_r.Weight_H[i]);
        }

        de_vrange_printf(SD_CFG->adpt_cfg_r.Vrange_H, SD_CFG->adpt_cfg_r.IIR_NUM_FLEX + SD_CFG->adpt_cfg_r.IIR_NUM_FIX);
        de_vrange_printf(SD_CFG->adpt_cfg_r.Vrange_M, SD_CFG->adpt_cfg_r.IIR_NUM_FLEX + SD_CFG->adpt_cfg_r.IIR_NUM_FIX);
        de_vrange_printf(SD_CFG->adpt_cfg_r.Vrange_L, SD_CFG->adpt_cfg_r.IIR_NUM_FLEX + SD_CFG->adpt_cfg_r.IIR_NUM_FIX);

        de_biquad_printf(SD_CFG->adpt_cfg_r.Biquad_init_H, SD_CFG->adpt_cfg_r.IIR_NUM_FLEX + SD_CFG->adpt_cfg_r.IIR_NUM_FIX);
        de_biquad_printf(SD_CFG->adpt_cfg_r.Biquad_init_M, SD_CFG->adpt_cfg_r.IIR_NUM_FLEX + SD_CFG->adpt_cfg_r.IIR_NUM_FIX);
        de_biquad_printf(SD_CFG->adpt_cfg_r.Biquad_init_L, SD_CFG->adpt_cfg_r.IIR_NUM_FLEX + SD_CFG->adpt_cfg_r.IIR_NUM_FIX);
#endif
#endif

    }
}

#endif
